LassoScript Utility
Basics Browse Detail

[ChartFX->SetLassoData]

Tag Link [ChartFX->SetLassoData] Category ChartFX
Type Member Source Available Yes
Support Preferred Version 8.5
Change New Data Source Any
Output Type None Security None
Implementation Sets Lasso 8.5

Description

[ChartFX->SetLassoData] sets the data for a Chart FX chart using a [Records_Array] data structure. Usually the results of a database search will be fed into a chart directly using [Records_Array], but it is also possible to construct an array of arrays programmatically where each inner array represents one data point. Generally the first column which contains non-numeric values will be used as the label for the data point. The [ChartFX->SetDataType] tag can be used to explicitly set the type for different columns or to ignore certain columns. Consult the Chart FX documentation for full details about how text files are interpreted.

Syntax

[Var: 'myRecordsArray' = (Array:
(Array: 'Data1', '9200', '7835'),
(Array: 'Data2', '14350', '11233'))]

[Var:'MyChart'=ChartFX]
[$MyChart->SetWidth(800)]
[$MyChart->SetHeight(600)]
[$MyChart->SetTemplate('MyChart.cfx')]
[$MyChart->SetLassoData($myRecordsArray)]
[$MyChart->SetDataType(0,'LABEL')]
[$MyChart->SetDataType(1,'VALUE')]
[$MyChart->SetDataType(2,'VALUE')]
[$MyChart->Render]

Parameters

Required Parameters
Records Array An array of arrays containing the data which is to be charted. The data should be formatted like the output of the [Records_Array] tag.

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.